// 在这里面定义所有接口，一个文件管理所有接口，易于维护
import {
  http
} from './http'; // 引入刚刚封装好的http模块，import属于ES6的语法，微信开发者工具必须打开ES6转ES5选项
//车辆列表
function list(postData, doSuccess, doFail, doComplete) {
  http('car/list', 'post', postData, doSuccess, doFail, doComplete)
}

//车辆预约列表
function Reservationlist(postData, doSuccess, doFail, doComplete) {
  http('carReservation/list', 'post', postData, doSuccess, doFail, doComplete)
}
//车预约
function save(postData, doSuccess, doFail, doComplete) {
  http('carReservation/save', 'post', postData, doSuccess, doFail, doComplete)
}


//审批列表
function getAuditList(postData, doSuccess, doFail, doComplete) {
  http('carReservation/getAuditList', 'post', postData, doSuccess, doFail, doComplete)
}
//审核操作
function saveAudit(postData, doSuccess, doFail, doComplete) {
  http('carReservation/saveAudit', 'post', postData, doSuccess, doFail, doComplete)
}

//查询详情
function getDataById(postData, doSuccess, doFail, doComplete) {
  http('carReservation/getDataById', 'post', postData, doSuccess, doFail, doComplete)
}
//车新增
function carsave(postData, doSuccess, doFail, doComplete) {
  http('car/save', 'post', postData, doSuccess, doFail, doComplete)
}
//车修改
function carupdateById(postData, doSuccess, doFail, doComplete) {
  http('car/updateById', 'post', postData, doSuccess, doFail, doComplete)
}

//车删除
function cardel(postData, doSuccess, doFail, doComplete) {
  http('car/del', 'post', postData, doSuccess, doFail, doComplete)
}
//车预约修改
function carReservationupdateById(postData, doSuccess, doFail, doComplete) {
  http('carReservation/updateById', 'post', postData, doSuccess, doFail, doComplete)
}
export default { // 暴露接口
  list,
  Reservationlist,
  save,
  getAuditList,
  getDataById,
  saveAudit,
  cardel,
  carupdateById,
  carsave,
  carReservationupdateById
}